/**
 * 
 */
package com.door.erp.sevice.impl;

import java.util.Date;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.door.erp.dao.SellOrderDao;
import com.door.erp.dao.base.GenericDao;
import com.door.erp.model.Orders;
import com.door.erp.model.SellOrder;
import com.door.erp.sevice.SellOrderService;
import com.door.erp.sevice.base.GenericServiceImpl;

/**
 * @author xiaolongwei@gmail.com
 *
 * 
 */
@Service(value = "sellOrderService")
public class SellOrderServiceImpl extends GenericServiceImpl<SellOrder, Long> implements SellOrderService {
	@Resource(name="sellOrderDao", type=SellOrderDao.class)
	private SellOrderDao sellOrderDao;
	@Override
	public GenericDao<SellOrder, Long> getDao() {
		// TODO Auto-generated method stub
		return sellOrderDao;
	}
    public void  generateSellOrder(Orders orders){
    	SellOrder sellOrder = new SellOrder();
    	sellOrder.setOrder(orders);
    	sellOrder.setCreateTime(new Date());
    	sellOrderDao.add(sellOrder);
    	}
}
